package com.lopo.pagehelper;

import com.lopo.bean.TestBean;
import com.lopo.mapper.DateMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ListService {
    @Autowired
    private DateMapper dateMapper;


    public Response<PageResponse<TestBean>> getList(Integer pageNumber, Integer pageSize) {
        List<TestBean> testBeans = dateMapper.selectList(pageNumber,pageSize);
        final PageResponse<TestBean> pageResponse = new PageResponse<>();
        pageResponse.setRows(testBeans);
        return Response.success(pageResponse);
    }

    public void ddd(PageResponse response) {

    }
}
